<!-- include tpl=head_lay -->
<div class="layui-card" id="search_html"{if !$keywords} style="display:none"{/if}>
	<div class="layui-card-header">{lang搜索}</div>
	<div class="layui-card-body">
		<div class="layui-form layuiadmin-card-header-auto">
			<form method="post" action="{url ctrl=address/}">
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label layui-icon layui-icon-tips" lay-tips="{lang包括用户的账号，邮箱及手机号，不支持模糊搜索}"> {lang用户}</label>
					<div class="layui-input-inline">
						<input type="text" name="keywords[user]" value="{$keywords.user}" class="layui-input">
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label layui-icon layui-icon-tips" lay-tips="{lang支持模糊搜索，可以填写国家，省份，城市及地址明细信息}"> {lang地址}</label>
					<div class="layui-input-inline">
						<input type="text" name="keywords[address]" value="{$keywords.address}" class="layui-input">
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label layui-icon layui-icon-tips" lay-tips="{lang包括地址库里的手机，固定电话及Email，不支持模糊搜索}"> {lang联系方式}</label>
					<div class="layui-input-inline">
						<input type="text" name="keywords[contact]" value="{$keywords.contact}" class="layui-input">
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label layui-icon layui-icon-tips" lay-tips="{lang地址库里的联系人姓名，不支持模糊搜索}"> {lang姓名}</label>
					<div class="layui-input-inline">
						<input type="text" name="keywords[fullname]" value="{$keywords.fullname}" class="layui-input">
					</div>
				</div>
				<div class="layui-inline">
					<input type="submit" value="{lang搜索}" class="layui-btn" />
					<input type="button" value="{lang取消搜索}" class="layui-btn layui-btn-primary" onclick="$.phpok.go('{url ctrl=address/}')" />
				</div>
			</div>
			</form>
		</div>
	</div>
</div>
<div class="layui-card">
	<div class="layui-card-header clearfix">{lang列表}
		<div class="layui-btn-group fr">
			<button class="layui-btn layui-btn-sm" onclick="$.admin_address.add()">
				<i class="layui-icon">&#xe654;</i>
				{lang添加}
			</button>
			<button class="layui-btn layui-btn-primary layui-btn-sm" onclick="$.admin.hide_show('search_html')">
				<i class="layui-icon">&#xe615;</i>
				{lang搜索}
			</button>
		</div>
	</div>
	<div class="layui-card-body">
		<table class="layui-table">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>{lang用户}</th>
					<th>{lang姓名}</th>
					<th>{lang地址}</th>
					<th>{lang联系方式}</th>
					<th>{lang邮编}</th>
					<th>{lang操作}</th>
				</tr>
			</thead>
			<tbody>
				<!-- loop from=$rslist key=$key value=$value id=$tmpid -->
				<tr id="address_{$value.id}">
					<td>{$value.id}</td>
					<td>{$value.user}</td>
					<td>{$value.fullname}</td>
					<td>
						{$value.country}
						<!-- if $value.province != $value.city -->/ {$value.province}<!-- /if -->
						<!-- if $value.city != $value.county && $value.city -->/ {$value.city}<!-- /if -->
						<!-- if $value.county -->/ {$value.county}<!-- /if -->
						/ {$value.address}
						<!-- if $value.is_default --><span class="layui-badge-rim">{lang默认}</span><!-- /if -->
					</td>
					<td>
						<!-- if $value.mobile --><div class="layui-icon icon-mobile"> {$value.mobile}</div><!-- /if -->
						<!-- if $value.email --><div class="layui-icon icon-envelope" style="margin-top:7px"> {$value.email}</div><!-- /if -->
						<!-- if $value.tel --><div class="layui-icon icon-phone" style="margin-top:7px"> {$value.tel}</div><!-- /if -->
					</td>
					<td>{$value.zipcode}</td>
					<td>
						<button class="layui-btn layui-btn-sm" onclick="$.admin_address.edit('{$value.id}')">{lang编辑}</button>
						<button class="layui-btn layui-btn-danger layui-btn-sm" onclick="$.admin_address.del('{$value.id}')">{lang删除}</button>
					</td>
				</tr>
				<!-- /loop -->
			</tbody>
		</table>
	</div>
</div>
<!-- include tpl=foot_lay -->